#ifndef TCHARTAXESSCALER_H
#define TCHARTAXESSCALER_H

#include <QObject>
#include <QCursor>

class MainPlot;

class TChartAxesScaler : public QObject
{
    Q_OBJECT
    MainPlot * plot;

    double xl;
    double xr;
    double yt;
    double yb;

    double w;
    double h;

    int pxl;
    int pyt;

    int pw;
    int ph;

    int cursorX;
    int cursorY;

    enum DirectionType
    {
        HL, HR, VB, VT, NON
    } dType;

    QCursor tCursor;

public:
    explicit TChartAxesScaler( MainPlot * p );

protected:
    bool eventFilter( QObject * obj, QEvent * e );

private:
    double limitScale( double a, double b ) { return a > 16*b ? 16*b : a; }
    
signals:
    
public slots:
    
};

#endif // TCHARTAXESSCALER_H
